﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="UserRoundManage.aspx.cs" Inherits="ProjectSem40701.Admin.UserRoundManage" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="title" runat="server">
    <title>Quản lí vòng thi</title>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <li><a href="#" class="report">Thêm kỳ thi mới</a></li>
    <li><a href="UserRound.aspx">Chọn thí sinh vào vòng sau</a></li>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <!--
        set tab active here
     -->
    <script type="text/javascript" language="javascript">
        setTab(document.getElementById("7"));
    </script>
    <!--
        end set tab active
     -->
     <div id="box">
        <telerik:radscriptmanager ID="RadScriptManager1" runat="server">
        </telerik:radscriptmanager>      
        <h3>Quản lí vòng thi</h3>
        <fieldset class="fieldset">
            <legend>
                Quản lí vòng thi
            </legend>
            
            <p>
                <label>Kỳ thi</label>
                
                <asp:DropDownList ID="DropDownList1" runat="server" 
                    DataSourceID="ObjectDataSource3" DataTextField="ExamName" 
                    DataValueField="ExamID" Width="150px" 
                    ondatabound="DropDownList1_DataBound" 
                    onselectedindexchanged="DropDownList1_SelectedIndexChanged" 
                    AutoPostBack="True">
                </asp:DropDownList>
                <asp:ObjectDataSource ID="ObjectDataSource3" runat="server" 
                    OldValuesParameterFormatString="original_{0}" 
                    SelectMethod="Get_tbl_Exam_Select_All" 
                    TypeName="ProjectSem40701.Admin.AdminXSD.ExamTableAdapters.tbl_ExamTableAdapter">
                </asp:ObjectDataSource>
            </p>
            
            <p>
                <label>Vòng trước</label>
                <asp:DropDownList ID="DropDownList2" runat="server" 
                    DataSourceID="ObjectDataSource1" DataTextField="RoundName" 
                    DataValueField="RoundID" Width="150px" 
                    ondatabound="DropDownList2_DataBound" 
                    onselectedindexchanged="DropDownList2_SelectedIndexChanged" 
                    AutoPostBack="True">
                </asp:DropDownList>                
                
                <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                    OldValuesParameterFormatString="original_{0}" 
                    SelectMethod="Get_tbl_Round_Select_All_By_ExamID" 
                    TypeName="ProjectSem40701.Admin.AdminXSD.RoundTableAdapters.tbl_RoundTableAdapter">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="DropDownList1" Name="exid" 
                            PropertyName="SelectedValue" Type="Int32" />
                    </SelectParameters>
                </asp:ObjectDataSource>
                                
            </p>

        </fieldset>
    </div>
    
    <asp:GridView ID="grvUserRoundManage" runat="server" AllowPaging="True" 
        AllowSorting="True" AutoGenerateColumns="False" 
        DataKeyNames="UserID,RoundID,UserID1" DataSourceID="ObjectDataSource2">
        <Columns>
            <asp:BoundField DataField="UserID" HeaderText="Mã thí sinh" ReadOnly="True" 
                SortExpression="UserID" />
            <asp:BoundField DataField="UserIDCard" HeaderText="IDCard" 
                SortExpression="UserIDCard" />
            <asp:BoundField DataField="UserFirstName" HeaderText="Họ" 
                SortExpression="UserFirstName" />
            <asp:BoundField DataField="UserLastName" HeaderText="Tên" 
                SortExpression="UserLastName" />
            <asp:BoundField DataField="Mark" HeaderText="Điểm" SortExpression="Mark" />
            <asp:BoundField DataField="TimeComplete" HeaderText="TimeComplete" 
                ReadOnly="True" SortExpression="TimeComplete" />
            <asp:TemplateField HeaderText="Trạng thái" SortExpression="Status">
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" ondatabinding="Label1_DataBinding" 
                        Text='<%# Eval("Status") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
</asp:GridView>
    <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" 
        OldValuesParameterFormatString="original_{0}" 
        SelectMethod="UserRoundSelectByID" 
        TypeName="ProjectSem40701.Admin.AdminXSD.UserRoundTableAdapters.UserRoundSelectTableAdapter">
        <SelectParameters>
            <asp:ControlParameter ControlID="DropDownList2" Name="RoundID" 
                PropertyName="SelectedValue" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>

